#!/bin/usr/env ruby
FTP={ :address=>'nextst.com',:id=>'neocoin@nextst.com',:pass=>'trimek88!!'}
def upload_file src_path, dest_path
  require 'net/ftp'
  Net::FTP.open(FTP[:address]) do |ftp|
    ftp.login FTP[:id], FTP[:pass]
    ftp.putbinaryfile src_path, dest_path
 end
end

def log_prefix
  require 'time'
  Time.now.strftime('[%a %b %d %H:%M:%S %Z %Y]')
end

def message msg
  puts "#{log_prefix} Start #{msg}"
  yield
  puts "#{log_prefix} End #{msg}"
end
